<template>
  <div class="home">
    home
    <button @click="add">改变state的num</button>
    <p>{{ this.$store.state.num }}</p>
  </div>
</template>

<script>


export default {
  name: 'Home',
  methods: {
    add(){
      this.$store.dispatch("addNum")
    }
  },
}
</script>
